class ApiResultData<T> {
  int? status;
  String? message;
  T? data;

  ApiResultData({
    this.status,
    this.message,
    this.data
  });


  ApiResultData.fromJson(
      Map<String, dynamic> json, T Function(Map<String, dynamic>) fromJsonT) {
    status = json['status'];
    message = json['message'];
    data = json['data'] != null ? fromJsonT(json['data']) : null;
  }

  ApiResultData.fromListJson(
      Map<String, dynamic> json, T Function(List<dynamic>) fromJsonT) {
    status = json['status'];
    message = json['message'];
    data = json['data'] != null ? fromJsonT(json['data']) : null;
  }

  Map<String, dynamic> toJson(Map<String, dynamic> Function(T) toJsonT) {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['status'] = this.status;
    data['message'] = this.message;
    if (this.data != null) {
      data['data'] = toJsonT(this.data!);
    }
    return data;
  }

  @override
  String toString() {
    return 'ApiResultData{status: $status, message: $message, data: $data}';
  }
}
